gtk_list_box_set_focus: Handle ist_box == NULL
authorTimm Bäder <mail@baedert.org>
Thu, 3 Oct 2013 12:00:30 +0000 (14:00 +0200)
committerAlexander Larsson <alexl@redhat.com>
Thu, 3 Oct 2013 12:05:12 +0000 (14:05 +0200)
Rows without a parent GtkListBox can happen in Glade and its previewer.

gtk/gtklistbox.c

index d94c966be22a0752c084f346230a00418f2d0d14..bcff01b3c5c16cecffa5bcc37b750ade18b737c4 100644 (file)
@@ -2420,6 +2420,9 @@ gtk_list_box_row_set_focus (GtkListBoxRow *row)
   GdkModifierType state = 0;
   gboolean modify_selection_pressed;
 
+  if (!list_box)
+    return;
+
   modify_selection_pressed = FALSE;
   if (gtk_get_current_event_state (&state))
     {